/*** 后端请求工具类 */
export const requestUtil = (params) => {
  return new Promise((resolve, reject) => {
    wx.request({
      ...params,
      url:baseURL+params.url,
      success: (result) => {
        resolve(result.data)
      },
      fail: (err) => {
        reject(err)
      }
    })
  });
}

// 定义请求根路径baseUrl 
const baseURL = "http://localhost:7777"; /*** 返回请求根路径baseUrl */
export const getBaseURL = () => {
  return baseURL;
}